***Civil Liberties and Terrorism Code
***Survey fielded 11/6/2019 - 11/19/2019
***Fielded on Amazon Mechanical Turk
***Cora Caton and Kevin Mullinix

*Use data file: MTurkPreTestData.dta

***Experimental Condition
tab CatonGroup
gen group=.
replace group=0 if CatonGroup=="Caton_Control"
replace group=1 if CatonGroup=="Caton_IF"
replace group=2 if CatonGroup=="Caton_WN"
tab group
label define group 0 "Control" 1 "Islamic Fundamentalist" 2 "White Nationalist"
label values group group
tab group


***Demographics

*Note: tables for these recoded variables are the basis for the corresponding sample information in the Supplemental Materials

*Party Q107 Generally speaking, do you think of yourself as a Republican, Democrat, Independent, or what?
*Republican  (1) 
*Democrat  (2) 
*Independent  (3) 
*Other party (specify)  (4) 

*Q108 Would you call yourself a strong Democrat or not a very strong Democrat?
*Strong  (1) 
*Not very strong  (2) 

*Q109 Would you call yourself a strong Republican or not a very strong Republican?
*Strong  (1) 
*Not very strong  (2) 

*Q110 Do you think of yourself as closer to the Republican Party or the Democratic Party?
*Closer to Republican  (1) 
*Neither  (2) 
*Closer to Democratic  (3) 

tab Q107
tab Q108
tab Q109
tab Q110
gen party7=.
replace party7=1 if Q108=="1"
replace party7=2 if Q108=="2"
replace party7=3 if Q110=="3"
replace party7=4 if Q110=="2"
replace party7=5 if Q110=="1"
replace party7=6 if Q109=="2"
replace party7=7 if Q109=="1"
tab party7

gen party2=.
replace party2=0 if party7==1
replace party2=0 if party7==2
replace party2=0 if party7==3
replace party2=1 if party7==5
replace party2=1 if party7==6
replace party2=1 if party7==7
tab party2
tab party2
label define party2 0 "Democrat" 1 "Republican"
label values party2 party2
tab party2

gen party3=.
replace party3=0 if party7==1
replace party3=0 if party7==2
replace party3=0 if party7==3
replace party3=1 if party7==4
replace party3=2 if party7==5
replace party3=2 if party7==6
replace party3=2 if party7==7
tab party3
label define party3 0 "Democrat" 1 "Independent" 2 "Republican"
label values party3 party3
tab party3


*Ideology. Q111 1=Extremely liberal. 7=extremely conservative
tab Q111
destring Q111, replace
gen ideo=Q111
tab ideo


*Gender. Q115 What is your gender?
*Male  (1) 
*Female  (2) 
*Other  (3) 
tab Q115
gen gender=.
replace gender=1 if Q115=="1"
replace gender=2 if Q115=="2"
tab gender
label define gender 1 "Male" 2 "Female"
label values gender gender
tab gender

*Education. Q116 What is the highest level of education you have completed?

tab Q116
destring Q116, replace
tab Q116
gen edu=Q116
tab edu
tabstat edu, stats(p50)

*Age. Q117 What is your age?
tab Q117
destring Q117, replace
tab Q117
gen age=Q117
tab age
mean age

*Income. Q118 What is your estimate of your annual household income (before taxes)?
tab Q118
destring Q118, replace
tab Q118
gen income=Q118
tab income
tabstat income, stats(p50)


*Q113 Are you Spanish, Hispanic, or Latino or none of these?
*Yes  (1) 
*None of these  (0) 
*Q114 Choose one or more races that you consider yourself to be. Check all that apply. 
*White  (1) 
*Black or African American  (2) 
*American Indian or Alaska Native  (3) 
*Asian  (4) 
*Native Hawaiian or Pacific Islander  (5) 
*Other (please specify)  (6) 
tab Q113
tab Q114

gen race3=.
replace race3=0 if Q113=="0" & Q114=="1"
replace race3=1 if Q113=="0" & Q114=="2"
replace race3=2 if Q113=="1" & Q114=="1"
replace race3=2 if Q113=="1" & Q114=="2"
replace race3=2 if Q114=="1,2,3"
replace race3=2 if Q114=="1,3,6"
replace race3=2 if Q114=="1,4"
replace race3=2 if Q114=="1,5"
replace race3=2 if Q114=="1,6"
replace race3=2 if Q114=="2,4"
replace race3=2 if Q114=="3"
replace race3=2 if Q114=="4"
tab race3
label define race3 0"Non-Hispanic White" 1 "Non-Hispanic Black" 2 "Other"
label values race3 race3
tab race3

*Authoritarianism
*Q120 Please tell us which one you think is more important for a child to have: independence or respect for elders?
*Independence  (1)
*Respect for elders  (2)
tab Q120
gen auth1=.
replace auth1=0 if Q120=="1"
replace auth1=1 if Q120=="2"
tab auth1

*Q121 Please tell us which one you think is more important for a child to have: obedience or self reliance? 
*Obedience  (1) 
*Self reliance  (2) 
tab Q121
gen auth2=.
replace auth2=0 if Q121=="2"
replace auth2=1 if Q121=="1"
tab auth2

*Q122 Please tell us which one you think is more important for a child to have: curiosity or good manners? 
*Curiosity  (1) 
*Good manners  (2) 
tab Q122
gen auth3=.
replace auth3=0 if Q122=="1"
replace auth3=1 if Q122=="2"
tab auth3

*Q123 Please tell us which one you think is more important for a child to have: being considerate or well behaved? 
*Considerate  (1) 
*Well behaved  (2) 
tab Q123
gen auth4=.
replace auth4=0 if Q123=="1"
replace auth4=1 if Q123=="2"
tab auth4

gen auth= auth1+auth2+auth3+auth4
tab auth


***************************
*Dependent Variables*******
***************************

*Q8 Should people suspected of terrorist involvement be banned from making public speeches?
*Q17 Should Islamic Fundamentalists suspected of terrorist involvement be banned from making public speeches?
*Q25 Should White Nationalists suspected of terrorist involvement be banned from making public speeches?
tab Q8
tab Q17
tab Q25
gen speech=.
replace speech=0 if Q8=="0" | Q17=="0" | Q25=="0"
replace speech=1 if Q8=="1" | Q17=="1" | Q25=="1"
tab speech

*Full Model for Supplementals
logit speech i.group i.party2 gender i.race3 edu age income auth i.group##i.party2, robust
*outreg2 using ModelsDi.doc, replace ctitle(Ban Speech) label 

*Q4 If a person is suspected of being a terrorist, should the government be allowed to monitor their phone calls without obtaining a warrant?
*Q13 If a person is suspected of being an Islamic Fundamentalist terrorist, should the government be allowed to monitor their phone calls without obtaining a warrant?
*Q22 If a person is suspected of being a White Nationalist terrorist, should the government be allowed to monitor their phone calls without obtaining a warrant?
*1=yes
*0=No
tab Q4
tab Q13
tab Q22

gen monitor=.
replace monitor=1 if Q4=="1"
replace monitor=1 if Q13=="1"
replace monitor=1 if Q22=="1"
replace monitor=0 if Q4=="0"
replace monitor=0 if Q13=="0"
replace monitor=0 if Q22=="0"
tab monitor
label define monitor 0 "No" 1 "Yes"
label values monitor monitor
tab monitor

*Full Model for Supplementals
logit monitor i.group i.party2 gender i.race3 edu age income auth i.group#i.party2, robust
*outreg2 using ModelsDi.doc, append ctitle(Monitor) label 


*Q10 Should the government be allowed to hold a person suspected of being a terrorist for an unlimited amount of time?
*Q19 Should the government be allowed to hold an Islamic Fundamentalist suspected of plotting a terror attack for an unlimited amount of time?
*Q27 Should the government be allowed to hold a White Nationalist suspected of plotting a terror attack for an unlimited amount of time?
tab Q10
tab Q19
tab Q27

gen hold=.
replace hold=0 if Q10=="0" | Q19=="0" | Q27=="0"
replace hold=1 if Q10=="1" | Q19=="1" | Q27=="1"
tab hold

*Full Model for Supplementals
logit hold i.group i.party2 gender i.race3 edu age income auth i.group#i.party2, robust
*outreg2 using ModelsDi.doc, append ctitle(Hold) label 


*Q11 How strongly do you support or oppose the government shutting down social media accounts belonging to someone suspected of being a terrorist?
*Q20 How strongly do you support or oppose the government shutting down social media accounts belonging to someone suspected of being an Islamic Fundamentalist terrorist?
*Q28 How strongly do you support or oppose the government shutting down social media accounts belonging to someone suspected of being a White Nationalist terrorist?
tab Q11
tab Q20
tab Q28

gen media=.
replace media=0 if Q11=="0" | Q20=="0" | Q28=="0"
replace media=1 if Q11=="1" | Q20=="1" | Q28=="1"
replace media=2 if Q11=="2" | Q20=="2" | Q28=="2"
replace media=3 if Q11=="3" | Q20=="3" | Q28=="3"
replace media=4 if Q11=="4" | Q20=="4" | Q28=="4"
replace media=5 if Q11=="5" | Q20=="5" | Q28=="5"
replace media=6 if Q11=="6" | Q20=="6" | Q28=="6"
replace media=7 if Q11=="7" | Q20=="7" | Q28=="7"
replace media=8 if Q11=="8" | Q20=="8" | Q28=="8"
replace media=9 if Q11=="9" | Q20=="9" | Q28=="9"
replace media=10 if Q11=="10" | Q20=="10" | Q28=="10"
tab media

*Full Model for Supplementals
regress media i.group i.party2 gender i.race3 edu age income auth i.group#i.party2, robust
*outreg2 using ModelsDi.doc, append ctitle(Social Media) label 


